Page({
  onLoad({ id }) {
    this.houseId = id
    this.getHouseDetail(id)
  },
  async getHouseDetail(id) {
    const { code, data } = await wx.http.get(`/room/${id}`)
    if (code !== 10000) return
    // console.log(data)
    this.setData({ detail: data })
  },
  editHouse() {
    wx.navigateTo({
      // url: '/house_pkg/pages/form/index?id=' + this.data.detail.id,
      url: '/house_pkg/pages/form/index?id=' + this.houseId,
    })
  },
})
